import os
from blogm import settings


def savefile(iconfile,path='static'):
    for chunk in iconfile.chunks():
        with open(os.path.join(settings.BASE_DIR,path, iconfile.name), 'wb')as f:
            f.write(chunk)
    icon = iconfile.name
    return icon




































